﻿// LightNet - Lightweight .NET Framework
// Copyright (c) 2010 http://lightnet.codeplex.com

namespace System
{
    using System.Runtime.InteropServices;

    /// <summary>
    /// Indicates whether a program element is compliant with the Common Language Specification (CLS). This class cannot be inherited.
    /// </summary>
    [AttributeUsage(AttributeTargets.All, Inherited = true, AllowMultiple = false), ComVisible(true)]
    public sealed class CLSCompliantAttribute : Attribute
    {
        /// <summary>
        /// Gets the Boolean value indicating whether the indicated program element is CLS-compliant.
        /// </summary>
        /// <returns>true if the program element is CLS-compliant; otherwise, false.</returns>
        public bool IsCompliant { get; private set; }

        /// <summary>
        /// Initializes an instance of the <see cref="T:System.CLSCompliantAttribute" /> class with a Boolean value indicating whether the indicated program element is CLS-compliant.
        /// </summary>
        /// <param name="isCompliant">true if CLS-compliant; otherwise, false.</param>
        public CLSCompliantAttribute(bool isCompliant)
        {
            IsCompliant = isCompliant;
        }
    }
}
